package com.dc.commons.persistence;

import java.util.Date;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.MappedSuperclass;

import com.dc.commons.persistence.able.UseAble;
import com.dc.commons.persistence.embeddable.Member;
import com.dc.commons.status.UseStatus;

/*******************************************************************************<P>
 * 文件名: UseEntity.java <br>
 * 版本: 1.0<br>
 * 描述:<br>
 * 版权所有: <br>
 * <P>
 * 创建者: 王建栋 <br>
 * 创建日期: 2015年12月22日 上午12:01:41<br>
 * 修改者: <br>
 * 修改日期: <br>
 * 修改说明: <br>
 ******************************************************************************/
@MappedSuperclass
public abstract class UseEntity extends OperatorEntity implements UseAble{

	/**
	 * 使用状态
	 */
	private UseStatus useStatus;
	/**
	 * 使用人
	 */
	private Member useKey;
	
	/**
	 * 使用时间
	 */
	private Date useDate;
	
	
	@Override
	@Enumerated(EnumType.STRING)
	public UseStatus getUseStatus() {
		return this.useStatus;
	}

	@Override
	public void setUseStatus(UseStatus useStatus) {
		this.useStatus=useStatus;
	}

	@Override
	@AttributeOverrides({
		@AttributeOverride(name=Member.CODE,column=@Column(name="USE_KEY",length=50))
	})
	public Member getUseKey() {
		return this.useKey;
	}

	@Override
	public void setUseKey(Member useKey) {
		this.useKey=useKey;
	}

	@Override
	public Date getUseDate() {
		return this.useDate;
	}

	@Override
	public void setUseDate(Date useDate) {
		this.useDate=useDate;
	}

	

}
